﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UI/HRAdminUI/AdminMaster.Master"
    AutoEventWireup="true" CodeBehind="CreatePaySlip.aspx.cs" Inherits="HRM.UI.HRAdminUI.Payroll.CreatePaySlip" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContentBody" runat="server">
    <link href="../../../Styles/Salary/PayslipCss.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript">

        function CheckFindEmployeeField() {
            if (document.getElementById("<%=txtEmployeeCode.ClientID%>").value == "") {
                document.getElementById("<%=msgLabel.ClientID%>").textContent = "Please Enter Employee Code To Create Payslip!";
                document.getElementById("<%=msgLabel.ClientID%>").style.color = "red";
                document.getElementById("<%=txtEmployeeCode.ClientID%>").focus();
                return false;
            }
            return true;
        }
    </script>
    <script type="text/javascript" language="javascript">

        function CheckSearchSlip() {
            if (document.getElementById("<%=selectSearchMonth.ClientID%>").Value == "Defalut") {
                document.getElementById("<%=msgLabel.ClientID%>").textContent = "Please Select Any Month!";
                document.getElementById("<%=msgLabel.ClientID%>").style.color = "red";
                document.getElementById("<%=selectSearchMonth.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=selectYear.ClientID%>").Value == "Defalut") {
                document.getElementById("<%=msgLabel.ClientID%>").textContent = "Please Select any Year!";
                document.getElementById("<%=msgLabel.ClientID%>").style.color = "red";
                document.getElementById("<%=selectYear.ClientID%>").focus();
                return false;
            }
            return true;
        }
  

    </script>
    
    <script type="text/javascript" language="javascript">

        
        function CheckMonthYear() {
            if (document.getElementById("<%=selectMonth.ClientID%>").Value == "Defalut") {
                document.getElementById("<%=msgLabel.ClientID%>").textContent = "Please select any month!";
                document.getElementById("<%=msgLabel.ClientID%>").style.color = "red";
                document.getElementById("<%=selectMonth.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=selectYear.ClientID%>").Value == "Defalut") {
                document.getElementById("<%=msgLabel.ClientID%>").textContent = "Please Select any Year!";
                document.getElementById("<%=msgLabel.ClientID%>").style.color = "red";
                document.getElementById("<%=selectYear.ClientID%>").focus();
                return false;
            }
            return true;
        }
  
        
    </script>
    <div align="center">
        <asp:Label runat="server" ID="msgLabel"></asp:Label></div>
    <fieldset>
        <legend>Find Employee</legend>
        <div align="center">
            Employee Code<input type="text" runat="server" id="txtEmployeeCode" class="textboxinput" />
            <input type="submit" runat="server" id="btnFind" value="Find Employee" onserverclick="FindEmployee"
                class="btnCss" onclick="return CheckFindEmployeeField()" />
            <input type="submit" runat="server" value="Search Payslip" class="btnCss" onserverclick="searchPayslip" />
        </div>
    </fieldset>
    <div id="searchEmployeePayslipDiv" runat="server">
        <fieldset>
            <legend>Search Employee PaySlip</legend>
            <table class="searchPayslipTB">
                <tr>
                    <td style="width: 35%; text-align: right" valign="top">
                        Employee Code :<input type="text" id="txtEmployeeSearchCode" runat="server" class="textboxinputsearch" />
                    </td>
                    <td style="width: 24%; text-align: right" valign="top">
                        Month:<select runat="server" id="selectSearchMonth" class="dropdownCsssearch">
                            <option value="Defalut">-Select Month-</option>
                            <option value="January">January</option>
                            <option value="February">February</option>
                            <option value="March">March</option>
                            <option value="April">April</option>
                            <option value="May">May</option>
                            <option value="June">June</option>
                            <option value="July">July</option>
                            <option value="August">August</option>
                            <option value="September">September</option>
                            <option value="Octobor">Octobor</option>
                            <option value="November">November</option>
                            <option value="December">December</option>
                        </select>
                    </td>
                    <td style="width: 24%; text-align: right" valign="top">
                        Select Year :<select runat="server" id="selectSearchYear" class="dropdownCsssearch">
                            <option value="Dafult">-Select Year-</option>
                            <option value="2010">2010</option>
                            <option value="2011">2011</option>
                            <option value="2012">2012</option>
                            <option value="2013">2013</option>
                            <option value="2014">2014</option>
                            <option value="2015">2015</option>
                            <option value="2016">2016</option>
                            <option value="2017">2017</option>
                            <option value="2018">2018</option>
                            <option value="2019">2019</option>
                            <option value="2020">2020</option>
                            <option value="2021">2021</option>
                            <option value="2022">2022</option>
                            <option value="2023">2023</option>
                            <option value="2024">2024</option>
                            <option value="2025">2025</option>
                            <option value="2026">2026</option>
                            <option value="2027">2027</option>
                            <option value="2028">2028</option>
                            <option value="2029">2029</option>
                            <option value="2030">2030</option>
                        </select>
                    </td>
                    <td style="width: 16%" valign="top">
                        &nbsp;
                        <input id="Submit1" type="submit" runat="server" value="Search" class="btnCss" onserverclick="FindPaySlip"
                            onclick="return CheckSearchSlip()" />
                    </td>
                </tr>
            </table>
        </fieldset>
    </div>
    <br />
    <br />
    <fieldset>
        <legend>Pay Slip For The Employee</legend>
        <table width="100%">
            <tr>
                <td colspan="2" align="center">
                    <asp:Label runat="server" ID="msgLbl"></asp:Label>
                </td>
            </tr>
            <tr>
                <td valign="top" align="right" style="width: 50%">
                    Select Month-
                    <select class="dropdownCss" runat="server" id="selectMonth">
                        <option value="Default">-select Month-</option>
                        <option value="January">January</option>
                        <option value="February">February</option>
                        <option value="March">March</option>
                        <option value="April">April</option>
                        <option value="May">May</option>
                        <option value="June">June</option>
                        <option value="July">July</option>
                        <option value="August">August</option>
                        <option value="September">September</option>
                        <option value="Octobor">Octobor</option>
                        <option value="November">November</option>
                        <option value="December">December</option>
                    </select>
                </td>
                <td valign="top">
                    Year-
                    <select class="dropdownCss" runat="server" id="selectYear">
                        <option value="Default">-Select Year-</option>
                        <option value="2010">2010</option>
                        <option value="2011">2011</option>
                        <option value="2012">2012</option>
                        <option value="2013">2013</option>
                        <option value="2014">2014</option>
                        <option value="2015">2015</option>
                        <option value="2016">2016</option>
                        <option value="2017">2017</option>
                        <option value="2018">2018</option>
                        <option value="2019">2019</option>
                        <option value="2020">2020</option>
                        <option value="2021">2021</option>
                        <option value="2022">2022</option>
                        <option value="2023">2023</option>
                        <option value="2024">2024</option>
                        <option value="2025">2025</option>
                        <option value="2026">2026</option>
                        <option value="2027">2027</option>
                        <option value="2028">2028</option>
                        <option value="2029">2029</option>
                        <option value="2030">2030</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <table class="TotalInfoTB">
                        <tr>
                            <td>
                                <table class="empinfo">
                                    <tr>
                                        <td colspan="2" class="EmployeeInfoTd">
                                            Employee Info
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="lebelinfo">
                                            Employee Status
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:Label runat="server" ID="lblEmpStatus" BorderStyle="Double" Font-Bold="True"
                                                ForeColor="Red"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            Employee Code :
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:Label runat="server" ID="txtEmpCode"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            Employee Name :
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:Label runat="server" ID="txtEmpName"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            Designation :
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:Label runat="server" ID="txtEmpDegignation"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            Department :
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:Label runat="server" ID="txtEmpProject"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            DOJ :
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:Label runat="server" ID="txtDOJ"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <table class="salaryinfo">
                                    <tr>
                                        <td colspan="2" class="salaryTd">
                                            Salary Structure
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            Basic Salary :
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:Label runat="server" ID="txtBasic"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            Medical Allowance :
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:Label runat="server" ID="txtMedical"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            Transport :
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:Label runat="server" ID="txtTransport"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            Mobile Bill :
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:Label runat="server" ID="txtMobile"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            PF :
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:Label runat="server" ID="txtPF"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            Gross Salary :
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:Label runat="server" ID="txtGross"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <table class="attendanceinfo">
                                    <tr>
                                        <td colspan="2" class="AttendenceTd">
                                            Attendence Info
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            Total Days of Month :
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:Label runat="server" ID="txtMonthOfDays"></asp:Label>&nbsp;Days
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            Days Present :
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:Label runat="server" ID="txtDaysPresent"></asp:Label>&nbsp;Days
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            Absent Days :
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:Label runat="server" ID="txtAbsentDays"></asp:Label>&nbsp;Days
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            Holiday :
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:Label runat="server" ID="txtHoliday"></asp:Label>&nbsp;Days
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            Leave :
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:Label runat="server" ID="txtLeave"></asp:Label>&nbsp;Days
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            Late:
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:Label runat="server" ID="txtLate"></asp:Label>&nbsp;Days
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                    <table class="otherEarningTB">
                        <tr>
                            <td>
                                <table class="other1stTd">
                                    <tr>
                                        <td colspan="2" class="otherTitle">
                                            Others Earnings
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            Conveyance :
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:TextBox runat="server" ID="txtConveyance" OnTextChanged="txtConveyance_TextChanged"
                                                AutoPostBack="True"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            Incentive :
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:TextBox runat="server" ID="txtIncentive" OnTextChanged="txtIncentive_TextChanged"
                                                AutoPostBack="True"></asp:TextBox>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <table class="deductionTB">
                                    <tr>
                                        <td colspan="2" class="deductiontitle">
                                            Deduction from Balance
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            PF :
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:TextBox runat="server" ID="txtInputPF" ReadOnly="True"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="Label">
                                            Deduction :
                                        </td>
                                        <td class="lebelinfo">
                                            <asp:TextBox runat="server" ID="txtDeduction" AutoPostBack="True" OnTextChanged="txtDeduction_TextChanged"></asp:TextBox>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                    <br />
                    <table width="100%">
                        <tr>
                            <td align="right" valign="top" style="width: 50%">
                                Net Salary=<asp:TextBox runat="server" ID="txtNetSalary" CssClass="netSalaryLabel"
                                    Height="25px" Width="150px" Font-Bold="True" ReadOnly="True"></asp:TextBox>
                            </td>
                            <td align="left" style="width: 50%">
                                &nbsp;&nbsp;
                                <input type="submit" runat="server" id="save" value="Save PaySlip" class="btnCss"
                                    onserverclick="SavePaySlip" onclick="return CheckMonthYear()"/>
                                <input id="edit" type="submit" runat="server" value="Edit PaySlip" class="btnCss"
                                    onserverclick="EditPaySlip" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </fieldset>
</asp:Content>
